//
//  HelpCenterViewController.m
//  Article
//
//  Created by Haricot_cpc17 on 16/4/27.
//  Copyright © 2016年 mac. All rights reserved.
//

#import "HelpCenterViewController.h"

@interface HelpCenterViewController () <UIScrollViewDelegate>

@end

@implementation HelpCenterViewController


-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    
    self.tabBarController.tabBar.hidden = YES;
    self.tabBarController.tabBar.translucent = YES;
    [self.navigationController.navigationBar setBarTintColor:UIColorFromRGB(MYColor)];
    
    self.navigationController.interactivePopGestureRecognizer.enabled = YES;
    self.navigationController.interactivePopGestureRecognizer.delegate =(id)self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationItem.title = @"帮助中心";
    
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"arrow"] style:UIBarButtonItemStylePlain target:self action:@selector(back)];
    self.navigationItem.leftBarButtonItem.tintColor = [UIColor whiteColor];
    
    [self.navigationController.navigationBar setTitleTextAttributes:
     @{NSFontAttributeName:[UIFont fontWithName:@"Heiti SC" size:18],
       NSForegroundColorAttributeName:[UIColor whiteColor]}];
    
    [self.navigationController.navigationBar setBarTintColor:UIColorFromRGB(MYColor)];
    
    [self createUI];
    
    self.view.backgroundColor = UIColorFromRGB(0xffffff);
    // Do any additional setup after loading the view.
}
-(void)back{
    [self.navigationController popViewControllerAnimated:YES];
}
-(void)createUI{
    UIScrollView *scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT)];
    scrollView.delegate = self;
    [self.view addSubview:scrollView];
    scrollView.scrollEnabled = YES;
    scrollView.contentSize = CGSizeMake(WIDTH, HEIGHT);
    
    UILabel *TextLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 0, WIDTH - 40, HEIGHT/5)];
    [scrollView addSubview:TextLabel];
    TextLabel.text = @"黑马营销,让朋友圈任意文章都带上你的广告!";
    TextLabel.font = [UIFont systemFontOfSize:13 *MYWIDTH];
    TextLabel.textColor = UIColorFromRGB(MYBlue);
    
    UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(20, HEIGHT/7, WIDTH - 40, HEIGHT/5)];
    label.text = @"如何快速在移动端推广？你还在每天为编辑微信公众号而花费大量时间吗？ \n\n 黑马营销是一款基于移动端推广的app的工具，可以快速生成带有通栏图片、图文、二维码等广告的文章，通过微信、qq、微博分享等口碑传播方式快速把企业产品宣传出去。";
    [scrollView addSubview:label];
    label.numberOfLines = 0;
    label.font = [UIFont systemFontOfSize:13 *MYWIDTH];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
